﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WxLib.TemplateMessage
{
    /// <summary>
    /// 微信模板消息
    /// </summary>
    [Serializable]
    public class WxTemplateMessage
    {
        /// <summary>
        /// 模板ID
        /// </summary>
        public string templateId { get; set; }
        /// <summary>
        /// 消息数据
        /// </summary>
        public Dictionary<string, MessageKeyword> messageData { get; set; }

        /// <summary>
        /// 模板需要放大的关键词，不填则默认无放大
        /// </summary>
        public string emphasisKeyword { get; set; }
    }

    /// <summary>
    /// 模板信息关键词
    /// </summary>
    [Serializable]
    public class MessageKeyword
    {
        public MessageKeyword() { }

        public MessageKeyword(string value)
        {
            this.value = value;
            this.color = "#173177";
        }

        public MessageKeyword(string value, string color)
        {
            this.value = value;
            this.color = color;
        }

        public string value { get; set; }
        public string color { get; set; }
    }
}
